<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<title>_上架任务分配</title>
	<script type="text/javascript">
		var filterParam = {};
		var datatable_content;
		
		function initTable(){
			datatable_content = $("#contentTable").dataTable({
			   "bServerSide":true,
			   "bAutoWidth":false,
	           "sAjaxSource":'${ctx}/v2_instorageUpDispatch/page',
	           "fnServerData": callback,
	           "fnRowCallback":rowCallBack,
	           "bFilter": false,
	           "bSort": false,
	           "sZeroRecords": "查询无记录！",
	           "bProcessing": true,
	           "oLanguage": {
	               "sUrl": '${ctx}/static/v2/js/plugins/datatables/cn.txt'
	            },
	             "aoColumns":[
					{"mData": null},
	             	{"mData": null},
	             	{"mData": null},
	             	{"mData": null},
	             	{"mData": null},
	             	{"mData": null},
	             	{"mData": null},
	             	{"mData": null},
	             	{"mData": null},
	             ],
	             "aoColumnDefs":[
                 {"aTargets": [0],
	              "mRender": function (data, display, row) {
	              		var str="<input type=\"checkbox\" name=\"alreadyMyChecked\" id=\"check_already"+row.id+"\" value="+row.taskCode+"  />";
						return str;
		           }
	            },           
	             {"aTargets": [2],
		              "mRender": function (data, display, row) {
		              		<c:forEach items="${customerList}" var="customer">
								if("${customer.customerCode}" == row.instorageBill.customerCode){
									return "${customer.customerName}";
								}
							</c:forEach>
							return "";
			           }
		            },
		            {"aTargets": [3],
		              "mRender": function (data, display, row) {
		              		<c:forEach items="${warehouseList}" var="warehouse">
								if("${warehouse.groupCode}" == row.instorageBill.inwarehouseCode){
									return "${warehouse.groupName}";
								}
							</c:forEach>
							return "";
			           }
		            },
	             	{"aTargets": [4],
		              "mRender": function (data, display, row) {
							return  row.instorageBill.billType == "customer" ? "<font color=red>采购入库</font>" : 
									row.instorageBill.billType == "allot" ? "<font color=green>调拨入库</font>" :
									row.instorageBill.billType == "cancelOrder" ? "<font color=blue>取消单入库</font>" :
									row.instorageBill.billType == "returnOrder" ? "<font color=black>退回件入库</font>" :
									row.instorageBill.billType == "preOrder" ? "<font color=black>预约入库</font>" : "";
			           }
		            },
	             	{"aTargets": [5],
		              "mRender": function (data, display, row) {
							return  row.instorageBill ? "<a href='${ctx}/v2_instorageUpDispatch/v2_instorageLog/"+row.instorageBill.billCode+"'>"+row.instorageBill.billCode+"</a>" :"";
			           }
		            },
		            {"aTargets": [6],
		              "mRender": function (data, display, row) {
							return row.instorageBill ? new Date(row.instorageBill.createTime.time).Format("yyyy-MM-dd hh:mm:ss") : "";
			           }
		            },
		            {"aTargets": [7],
		              "mRender": function (data, display, row) {
							return row.status == "0" ? "未处理" :
									row.status == "1" ? "已领取" :
									row.status == "2" ? "已分配" : "";
			           }
		            },
		            {"aTargets": [8],
		              "mRender": function (data, display, row) {
		            	   var rs="<a   class='btn btn-sm btn-primary'  role='button'  onclick=initPrint(this,'printUpTask','upTaskStylePrint','taskCode','1_"+row.instorageBill.billCode+"_"+row.instorageBill.billType+"')>打印验收单</a>"; 
		            	   return row.status == "0" ? rs+"<a class='btn btn-sm btn-primary' onclick=takeTask('"+row.id+"')>领取</a>" :
								   //row.status == "1" && "<shiro:principal property='jobuuid'/>" == row.workerUuid? rs+"<a class='btn btn-sm btn-primary' href='${ctx}/v2_instorageUpDispatch/toDispatchMain/"+row.id+"'>开始分配</a>" :
									row.status == "1" && "<shiro:principal property='jobuuid'/>" == row.workerUuid? rs+"<a class='btn btn-sm btn-primary' onclick=doDistribute('"+row.id+"')>开始分配</a>" :
									//row.status == "2" ? "<a  id = '"+row.taskCode+"' class='btn btn-sm btn-primary' href= '#printUpTask' role='button' data-toggle='modal' onclick=init('"+row.taskCode+"')>"+row.instorageBill.printFlag+"打印</a>" : "" ;
								   row.status == "2" ? rs+"<a   class='btn btn-sm btn-primary'  role='button'  onclick=initPrint(this,'printUpTask','upTaskStylePrint','taskCode','2_"+row.instorageBill.billCode+"')>打印上架单</a>" : rs ;
			           }
		            },
	             ]
			});
		}
		function filter(item){
			filterParam[item.name] = item;
		}
		function callback(sSource, aoData, fnCallback ) {
		   	var formParam = $("#queryForm").serializeArray();
			for(var n in filterParam){
				formParam.push(filterParam[n]);
			}
		   $.ajax({ 
		       "type": "post",
		       "contentType": "application/json", 
		       "url": sSource,    
		       "dataType": "json",   
		       "data": JSON.stringify(aoData.concat(formParam)),
		       "success": fnCallback  
		   });
		}
		
		/**
		*创建了行的回调
		*nRow为当前的tr
		*/
		function rowCallBack(nRow, aData, iDisplayIndex, iDisplayIndexFull){
			var iDisplayStart = datatable_content.fnSettings()._iDisplayStart;
			$("td:eq(1)", nRow).html(iDisplayStart+iDisplayIndex+1);
		}
		
		function load(){
			if($("#queryForm").valid()){
				if (datatable_content) {
					datatable_content.fnDestroy();
				}
				initTable();
			}
		}
        $(function() {
		    $("#queryForm").validate(); 
			$("#_fromDate").datepicker({ format : 'yyyy-mm-dd'});
			$("#_toDate").datepicker({ format : 'yyyy-mm-dd' });
			
			var now = new Date();
			var tomorrow = new Date();
			tomorrow.setDate(now.getDate()+1);
			$("#_fromDate").val(now.Format("yyyy-MM-dd"));
			$("#_toDate").val(tomorrow.Format("yyyy-MM-dd"));
			$("#_warehouseCode option:eq(1)").attr('selected','selected');
			$("#alreadyMyCheckedAll").iCheck({checkboxClass: 'icheckbox_minimal'});
			$("#alreadyMyCheckedAll").on("ifChecked", function(event){
				$("input[name='alreadyMyChecked'").iCheck('check'); 
		 	});
			$("#alreadyMyCheckedAll").on("ifUnchecked", function(event){
				$("input[name='alreadyMyChecked'").iCheck('uncheck'); 
		 	});
			
       });
        //批量打印
	function batchPrint(item,url){
		var taskCodes=getCheckedList();
		if(taskCodes.length==0){
			 $(item).removeAttr("href");
			 $(item).removeAttr("data-toggle");
			alert("请选择订单打印");
			return false;
		}
		
		$(item).attr("href","#"+url);
		 $(item).attr("data-toggle","modal");
		 $("#taskCodes").val(taskCodes);
		 packFormDefaultPrinter("upBatchTaskStylePrint"); 
		  
	}
	function getCheckedList(){
		var tempChecked = "";
		$("input[type='checkbox'][name='alreadyMyChecked']:checked").each(function(i) {
			if(tempChecked==""){
		        tempChecked=$(this).val();
		     }else{
		       tempChecked = tempChecked + ":" + $(this).val();
		     }
		});
		return tempChecked;
	}
	//批量打印
	function printBatchUpTask(){
		$.ajax({
			"type" : "post",
			"url" : "${ctx}/v2_instorageUpDispatch/ajaxBatchPrintUpTask",
			"dataType" : "json",
			"data" : {
				taskCodes : $("#taskCodes").val()
			},
			success : function(data) {
				if(data.status == 1){
					var map=data.content;
					var page=$("#upBatchTaskStylePrintPage").val().trim();
					for(var key in map){
						$.each(map[key], function(i,r) {
							printUpTaskBatch(r,page);
						});
					}
					var taskCodesArr=$("#taskCodes").val().split(":");
					for(var i=0;i<taskCodesArr.length;i++){
						document.getElementById(taskCodesArr[i]).innerHTML = "已打印" ; 
					}
				}else{
					jAlert(data.content);
				}
			},
			error : function() {
				jAlert("服务器异常");
			}
		});	
	}
	
 		//领取任务 
  function takeTask(taskId){
	  $.ajax({
			type:'post',
			url:'${ctx}/v2_instorageUpDispatch/ajaxTakeTask',
			data:{
				taskId:taskId
			},
			dataType:'json',
			success:function(data) {
			    if(data==true){
			      load();
			    }else{
			      jAlert("网络繁忙，请稍后重试...");
			    }
			},
			error:function(msg) {
				//jAlert("网络繁忙，请稍后重试...");
				jAlert(msg.responseText);
			}
	   });
  }
 		
 //开始分配
 function doDistribute(taskId){
	 $.ajax({
			type:'post',
			url:'${ctx}/v2_instorageUpDispatch/ajaxDoDistribute',
			data:{
				taskId:taskId
			},
			dataType:'json',
			success:function(data) {
			    if(data==true){
			      window.location.href="${ctx}/v2_instorageUpDispatch/toDispatchMain/"+taskId;
			    }else{
			      jAlert(data);
			    }
			},
			error:function(msg) {
				jAlert(msg.responseText);
			}
	   }); 
 }
 
 /**打印验收单**/
  function printNow(){
	  var billCodeArr=$("#taskCode").val().split("_");
	  var printName=$("#upTaskStylePrint").val();
	  var page=$("#upTaskStylePrintPage").val();
	  $.ajax({
			type : 'post',
			url  : '${ctx}/v2_instorageUpDispatch/printUpTaskPage',
			data : {
				printType:billCodeArr[0],
				billCode:billCodeArr[1],
				billType:billCodeArr[2]
			},
			async: false,
			dataType : 'json',
			success : function(data) {
				if(data.status="success"){
					if(billCodeArr[0]=="1"){
						printYSPage(data);
					}else{
						printSJPage(data);
					}
				}else{
					alert("打印失败！");
				}
			},
			error : function() {
				alert("查询数据错误！");
			}
		}); 
	}
 function printYSPage(data){
	  var instorageBill=data.instorageBill;
	  var receiptDate=data.receiptDate==""? "":data.receiptDate[0].createTime;
		var str ="";
		var printNum=instorageBill.printYsnum>1 ? "C"+instorageBill.printYsnum:"";
		str += "<table cellpadding='0' cellspacing='0' align = 'center' border='1'>";
		str += "<thead>";
		str += "<tr><td colspan='7' align = 'center'><h3>验收单</h3></td></tr>";
		var  customerOrderNo=instorageBill.preBill==null? "":instorageBill.preBill.customerOrderNo;
		str += "<tr><td colspan='7'><font color='red'><b>"+printNum+"</b></font></td></tr>";
		str += "<tr>";
		str += "<th  colspan= '3'>客户单号:"+customerOrderNo+"</th ><th  colspan= '4'>单据日期:"+date2str(new Date(instorageBill.createTime.time),"yyyy-MM-d h:m:s")+"</th >";
		str += "</tr>";
		str += "</thead>";
		str += "<tbody>";
		str += "<tr>";
		str += "<td colspan= '2'>仓库:"+instorageBill.inwarehouse.groupName+"</td><td>商家:"+instorageBill.customer.customerName+"</td><td colspan= '4' align = 'left'>入库单号:"+instorageBill.billCode+"</td>";
		str += "</tr>";
		str += "<tr style='font-size:12pt'><td width='6%'>序号</td><td width='18%'>sku</td><td width='31%'>sku名称</td><td width='10%'>生产日期</td><td width='15%'>规格</td><td width='10%' >数量</td><td width='10%'>实收数量</td></tr>";
		$.each(data.instorageBillItemYSList,function(i){
			str +="<tr style='font-size:12pt' ><td>"+(i+1)+"</td><td>"+data.instorageBillItemYSList[i].skuCode+"</td><td>"+data.instorageBillItemYSList[i].skuName+"</td><td></td><td>"+data.instorageBillItemYSList[i].spec+"</td><td align = 'right'>"+data.instorageBillItemYSList[i].goodsNum+"</td>"+
				"<td align = 'right'>"+data.instorageBillItemYSList[i].countNum+"</td></tr>";
		})
		str += "</tbody>";
		str += "<tfoot align = 'center'>";
		str += "<tr><td colspan= '5'></td><td align = 'right' tdata='Sum' format='#'>######</td><td align = 'right' tdata='Sum' format='#'>######</td></tr>";
		str += "<tr><td colspan= '2' align = 'left'>收货人:</td><td colspan= '2' align = 'left'>打印日期:"+date2str(new Date(),"yyyy-MM-d h:m:s")+"</td><td colspan= '3' align = 'left'>收货日期:"+receiptDate+"</td></tr>";
		str += "<tr><td colspan= '2' align = 'left'>客户签字:</td><td colspan= '5' align = 'left'>签字日期:</td></tr>";
		str += "</tfoot>";
		str += "</table>";
		printTableAndBARCODE(instorageBill.billCode,$("#upTaskStylePrint").val(),"A4",$("#upTaskStylePrintPage").val(),0,154,45,10,str);
 }
 function printSJPage(data){
	  var instorageBill=data.instorageBill;
	  var receiptDate=data.receiptDate==""? "":data.receiptDate[0].createTime;
		var str ="";
		var printNum=instorageBill.printSjnum>1 ? "C"+instorageBill.printSjnum:"";
		var  customerOrderNo=instorageBill.preBill==null? "":instorageBill.preBill.customerOrderNo;
		str += "<table cellpadding='0' cellspacing='0' align = 'center' border='1'>";
		str += "<thead>";
		str += "<tr><td colspan='7' align = 'center'><h3>上架单</h3></td></tr>";
		str += "<tr><td colspan='7'><font color='red'><b>"+printNum+"</b></font></td></tr>";
		str += "<tr>";
		str += "<th  colspan= '4'>客户单号:"+customerOrderNo+"</th ><th  colspan= '3'>商家:"+instorageBill.customerCode+"</th >";
		str += "</tr>";
		str += "</thead>";
		str += "<tbody>";
		str += "<tr>";
		str += "<td colspan= '4' align = 'left'>入库单号:"+instorageBill.billCode+"</td><td colspan= '3' ></td>";
		str += "</tr>";
		str += "<tr style='font-size:12pt'><td width='6%'>序号</td><td width='15%'>报损状态</td><td width='10%'>LPN</td><td width='18%'>sku</td><td width='31%'>sku名称</td><td width='10%' >待上架数量</td><td width='10%'>库位编码</td></tr>";
		$.each(data.instorageBillItemSJList,function(i){
			str +="<tr style='font-size:12pt' ><td>"+(i+1)+"</td><td>"+data.instorageBillItemSJList[i].errorFlag+"</td><td></td><td>"+data.instorageBillItemSJList[i].sku+"</td><td>"+data.instorageBillItemSJList[i].skuName+"</td><td align = 'right'>"+data.instorageBillItemSJList[i].unUpNum+"</td>"+
				"<td></td></tr>";
		})
		str += "</tbody>";
		str += "<tfoot align = 'center'>";
		str += "<tr><td colspan= '5'></td><td align = 'right' tdata='Sum' format='#'>######</td><td></td></tr>";
		str += "<tr><td colspan= '2' align = 'left'>收货人:</td><td colspan= '2' align = 'left'>打印日期:"+date2str(new Date(),"yyyy-MM-d h:m:s")+"</td><td colspan= '3' align = 'left'>收货日期:"+receiptDate+"</td></tr>";
		str += "</tfoot>";
		str += "</table>";
		printTableAndBARCODE(instorageBill.billCode,$("#upTaskStylePrint").val(),"A4",$("#upTaskStylePrintPage").val(),0,154,45,10,str);
}
  /* function init(taskCode){
	  packFormDefaultPrinter("upTaskStylePrint");
  	$("#taskCode").val(taskCode);
  } */
  
 /*  function printUpTask(){
  	$.ajax({
		"type" : "post",
		"url" : "${ctx}/v2_instorageUpDispatch/ajaxPrintUpTask",
		"dataType" : "json",
		"data" : {
			taskCode : $("#taskCode").val()
		},
		success : function(data) {
			if(data.status == 1){
				var page=$("#upTaskStylePrintPage").val().trim();
				$.each(data.content, function(i,r) {
					printUpTaskOne(r,page);
				});
			}else{
				jAlert(data.content);
			}
		},
		error : function() {
			jAlert("服务器异常");
		}
	});
  	document.getElementById($("#taskCode").val()).innerHTML = "已打印" ;  
  }
  function printUpTaskOne(printer,page){
    initLodop();
  	LODOP.PRINT_INIT(printer.printerName);
	LODOP.ADD_PRINT_TEXT(10, 10, 300, 20, printer.printerName);
	//var strCenterStyle = "<style/>table {width:100%}</style>";
	LODOP.ADD_PRINT_HTM(50, 5, "100%", "100%",  printer.content);
   
	if (LODOP.SET_PRINTER_INDEXA($("#upTaskStylePrint").val())) {
		if (LODOP.SET_PRINT_COPIES(page)) LODOP.PRINT();
	}
  }*/
  function printUpTaskBatch(printer,page){
	    initLodop();
	  	LODOP.PRINT_INIT(printer.printerName);
		LODOP.ADD_PRINT_TEXT(10, 10, 300, 20, printer.printerName);
		LODOP.ADD_PRINT_HTM(50, 5, "100%", "100%",  printer.content);	   
		if (LODOP.SET_PRINTER_INDEXA($("#upBatchTaskStylePrint").val())) {
			if (LODOP.SET_PRINT_COPIES(page)) LODOP.PRINT();
		}
	  }
    function initLodop() {
		LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
	}
    </script>
</head>

<body>
<section class="content">
	<div class="row">
		<div class="col-md-12">

			<!-- Primary box -->
			<div class="box box-solid box-primary">
				<div class="box-header">
					<i class="fa fa-search"></i>
					<h3 class="box-title">搜索栏</h3>
					<div class="box-tools pull-right">
						<button class="btn btn-primary btn-sm" data-widget="collapse" type="button">
							<i class="fa fa-minus"></i>
						</button>
					</div>
				</div>
				<div class="box-body">
	<form class="form-search" id="queryForm" >
		<div class="form-group row">
			<div class="col-sm-3">
			<div class="input-group col-sm-12">
			    <label class="input-group-text">商家：</label>
				 <select  name="_EQ_instorageBill.customerCode"  id="_customerCode" value="${param._customerCode}"  class="form-control" onchange="ajaxAreaGroup(this,'_warehouseCode');">
					<option value=""></option>
					<c:forEach items="${customerList}" var="customer">
						<option value="${customer.customerCode}"
						<c:if test="${param._EQ_instorageBill.customerCode eq customer.customerCode}">selected=selected</c:if>
						>${customer.customerName}</option>
					</c:forEach>
				</select>
			</div>
			</div>
				
			<div class="col-sm-3">
			<div class="input-group col-sm-12">	
				<label class="input-group-text">入库仓库：</label>
				   <select  name="_EQ_instorageBill.inwarehouseCode"  id="_warehouseCode"  class="form-control required" >
				     <option value=""></option>  
				     <c:forEach items="${warehouseList}" var="warehouse">
				       <option value="${warehouse.groupCode}" 
				       <c:if test="${param._EQ_instorageBill.inwarehouseCode eq warehouse.groupCode }">selected=selected</c:if>
				       >${warehouse.groupName}</option>
				     </c:forEach>
				</select>
			</div>
			</div>
			<div class="col-sm-3">
			<div class="input-group col-sm-12">	
				<label class="input-group-text">入库单状态：</label> 
				<select  name="_EQ_status"  id="_status" class="form-control">
					<option value="" <c:if test="${status eq ''}">selected=selected</c:if> ></option>
				    <option value="0" <c:if test="${status eq '0'}">selected=selected</c:if> >未处理</option>
				    <option value="1" <c:if test="${status eq '1'}">selected=selected</c:if> >已领取</option>
				    <option value="2" <c:if test="${status eq '2'}">selected=selected</c:if> >已分配</option>
				</select>
			</div>
			</div>
			
			<div class="col-sm-3">
			<div class="input-group col-sm-12">	
				<label class="input-group-text">入库单号：</label> 
				<input type="text" name="_EQ_instorageBill.billCode" id="_billCode"  class="form-control" value="${param._EQ_instorageBill.billCode}"/>
		    </div>
		    </div>
		</div>
		<div class="form-group row">
			<div class="col-sm-3">
			<div class="input-group col-sm-12">	
				<label class="input-group-text">入库日期：</label>
				<div class="input-group-addon">
					<i class="fa fa-calendar"></i>
				</div>
			 	<input type="text" name="_GTE_instorageBill.createTime" id="_fromDate"  class="form-control value="${param._GTE_instorageBill.createTime}"/> 
			 </div>
			 </div>
			 
			 <div class="col-sm-3">
			<div class="input-group col-sm-12">	
			 	<label class="input-group-text">至：</label>
			 	<div class="input-group-addon">
					<i class="fa fa-calendar"></i>
				</div>
			 	<input type="text" name="_LT_instorageBill.createTime" id="_toDate" class="form-control" value="${param._LT_instorageBill.createTime}" /> 
			 </div>
			 </div>
			 <div class="col-sm-3">
			<div class="input-group col-sm-12">	
			
			    <a type="button" class="btn btn-info" onclick="load()">搜索</a>
			    <a type="button" class="btn btn-info" onclick="batchPrint(this,'batchPrintUpTask')">批量打印</a>
			    </div>
			    </div>
			    </div>
		    
	   </form>
	</div>
	</div>
	</div>
	</div>
	
	
	<div class="form-group row">
		<div class="col-md-12">
			<div class="box box-solid box-primary">
				<div class="box-header">
					<i class="fa fa-list"></i>
					<h3 class="box-title">查询结果</h3>
					<div class="box-tools pull-right">
						<button class="btn btn-primary btn-sm" data-widget="collapse" type="button">
							<i class="fa fa-minus"></i>
						</button>
					</div>
				</div>
				<div class="box-body">
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead><tr>
			<th style="width: 30px;"><input type="checkbox" name="alreadyMyCheckedAll" id="alreadyMyCheckedAll" onclick="alreadyMyCheckedAll()" /></th>
		    <th style="width: 30px;">序号</th>
		    <th style="width: 60px;">商家</th>
		    <th style="width: 60px;">入库仓</th>
		    <th style="width: 60px;">入库类型</th>
		    <th style="width: 60px;">入库单号</th>
			<th style="width: 60px;">登记时间</th>
			<th style="width: 60px;">状态</th>
			<th style="width: 60px;">管理</th>
		</tr></thead>
		<tbody>
		</tbody>
	</table>
	</div>
	</div></div>
	</div>
	<!-- 打印按钮选择打印机 -->
	<div class="modal fade"  id="printUpTask">
	<div class="modal-dialog" >
	<div class="modal-content"  >
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
					aria-hidden="true">
					×
				</button>
				<h3 id="myModalLabel">
                                                        打印上架任务信息
				</h3>
				<span id="messageLable"></span>
				<input type="hidden" id="taskCode"/>
			</div>
			<div class="modal-body">
				<div class="control-group">
					<div class="controls">
						  选择打印机:
						<select id="upTaskStylePrint" name="upTaskStylePrint" >

						</select>
					</div>
					<div class="controls">
						  打印张数:
						<input type="text" id="upTaskStylePrintPage" name="upTaskStylePrintPage" value="1"/>
					</div>
				</div>
			</div>

			<div class="modal-footer">
				<a class="btn btn-primary" data-dismiss="modal" aria-hidden="true" onclick="printNow()"> 立即打印 </a>
				<a class="btn" data-dismiss="modal" aria-hidden="true"> 关闭 </a>
			</div>
		</div>
		</div>
		</div>
		<!-- 批量打印按钮选择打印机 -->
	<div class="modal fade"  id="batchPrintUpTask">
	<div class="modal-dialog" >
	<div class="modal-content"  >
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
					aria-hidden="true">
					×
				</button>
				<h3 id="myBatchModalLabel">
                                                  批量打印上架任务信息
				</h3>
				<span id="messageLable"></span>
				<input type="hidden" id="taskCodes"/>
			</div>
			<div class="modal-body">
				<div class="control-group">
					<div class="controls">
						  选择打印机:
						<select id="upBatchTaskStylePrint" name="upBatchTaskStylePrint" >

						</select>
					</div>
					<div class="controls">
						  打印张数:
						<input type="text" id="upBatchTaskStylePrintPage" name="upBatchTaskStylePrintPage" value="1"/>
					</div>
				</div>
			</div>

			<div class="modal-footer">
				<a class="btn btn-primary" data-dismiss="modal" aria-hidden="true" onclick="printBatchUpTask()"> 立即打印 </a>
				<a class="btn" data-dismiss="modal" aria-hidden="true"> 关闭 </a>
			</div>
		</div>
		</div>
		</div>
		
</section>	
</body>
</html>
